﻿@{
	Layout = "";
}
@model Nop.Plugin.Widgets.ShoppingMail.Models.ConfigurationModel
@using Nop.Web.Framework;
<script type="text/javascript">
	$(document).ready(function () {

		$("#@Html.FieldIdFor(model => model.UseSandbox)").click(toggleSandbox);

		toggleSandbox();
	});



	function toggleSandbox() {
		if (getE('@Html.FieldIdFor(model => model.UseSandbox)').checked) {
			$('#pnlToken').hide();
		}
		else {
			$('#pnlToken').show();
		}
	}


   
</script>
@using (Html.BeginForm())
{
	<table class="adminContent">
		<tr>
			<td class="adminTitle" colspan="2">
				Shopping-Mail est une plateforme d’échange de bannières au sein de vos emails transactionnels.
				<br />
			</td>
		</tr>
		<tr id="pnlUseSandbox">
			<td class="adminTitle">
				@Html.NopLabelFor(model => model.UseSandbox):
			</td>
			<td class="adminData">
				@Html.EditorFor(model => model.UseSandbox)
				@Html.ValidationMessageFor(model => model.UseSandbox)
			</td>
		</tr>
		<tr id="pnlToken">
			<td class="adminTitle">
				@Html.NopLabelFor(model => model.Token):
			</td>
			<td class="adminData">
				@Html.EditorFor(model => model.Token)
				@Html.ValidationMessageFor(model => model.Token)
			</td>
		</tr>
		<tr>
			<td class="adminTitle">
				@Html.NopLabelFor(model => model.IncludeBannerInMails):
			</td>
			<td class="adminData">
				@Html.EditorFor(model => model.IncludeBannerInMails)
				@Html.ValidationMessageFor(model => model.IncludeBannerInMails)
			</td>
		</tr>
		<tr id="pnlUseDynamicTargeting">
			<td class="adminTitle">
				@Html.NopLabelFor(model => model.UseDynamicTargeting):
			</td>
			<td class="adminData">
				@Html.EditorFor(model => model.UseDynamicTargeting)
				@Html.ValidationMessageFor(model => model.UseDynamicTargeting)
			</td>
		</tr>
		<tr>
			<td colspan="2" width="100%">
				<button type="submit" name="save" value="save" class="t-button">
					@T("Admin.Common.Save")</button>
			</td>
		</tr>
	</table>
}